﻿$(document).ready(function () {

    var i = 0;
    $('#SPEdragbar').mousedown(function (e) {

        e.preventDefault();
        //$('#mousestatus').html("mousedown" + i++);
        $(document).mousemove(function (e) {
            //$('#position').html(e.pageX + ', ' + e.pageY);
            $('#SPEsidebar').css("width", e.pageX + 2);
            $('#SPEmain').css("left", e.pageX + 2);
        });
        console.log("leaving mouseDown");
    });
    $(document).mouseup(function (e) {
        //$('#clickevent').html('in another mouseUp event' + i++);
        $(document).unbind('mousemove');
    });
});